Automated Modular Termination Proofs for Real Prolog Programs
نویسندگان
چکیده
We present a methodology for checking the termination of Prolog programs that can be automated and is scalable. Furthermore, the proposed method can be used to locate errors. It has been successfully implemented as part of a tool that uses static analysis based on formal methods in order to validate Prolog programs. This tool is aimed at supporting the design and maintenance of Prolog programs. Our approach is based on a natural extension of the notion of acceptable programs developed in Apt and Pedreschi AP90, AP93]. The main idea is to assign a measure of complexity to predicate calls. Then termination of a program is shown by proving this measure to be decreasing on re-cursive calls. While this measure is a natural number in AP90, AP93], we extend this idea by using tuples of natural numbers as a measure of complexity. These tuples are then compared lexicographicly. The use of this kind of measure enables us to reene the notion of acceptable programs to the notion of loop free programs. This notion can be used to modularize the termination proof of Prolog programs to a greater extend than previously possible.
منابع مشابه
Modular Termination Proofs for Logic and Pure Prolog Programs
We provide a uniform and simpliied presentation of the methods of Bezem Bez93] ((rst published as Bez89]) and of Apt and Pedreschi AP93] ((rst published as AP90]) for proving termination of logic and Prolog programs. Then we show how these methods can be reened so that they can be used in a modular way.
متن کاملAutomated termination analysis for logic programs with cut
Termination is an important and well-studied property for logic programs. However, almost all approaches for automated termination analysis focus on definite logic programs, whereas real-world Prolog programs typically use the cut operator. We introduce a novel pre-processing method which automatically transforms Prolog programs into logic programs without cuts, where termination of the cut-fre...
متن کاملAutomated Complexity Analysis for Prolog by Term Rewriting
For term rewrite systems (TRSs), a huge number of automated termination analysis techniques have been developed during the last decades, and by automated transformations of Prolog programs to TRSs, these techniques can also be used to prove termination of Prolog programs. Very recently, techniques for automated termination analysis of TRSs have been adapted to prove asymptotic upper bounds for ...
متن کاملA Theory of First - Order Built - in ' s of PrologKrzysztof
We provide here a framework for studying Prolog programs with various built-in's that include arithmetic operations, and such metalogical relations like var and ground. To this end we propose a new, declarative semantics and prove completeness of the Prolog computation mechanism w.r.t. this semantics. Finally, we provide a method for proving termination of Prolog programs with built-in's which ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996